﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using AssessmentTool.Services;
using AssessmentTool.PresentationLogic.Controllers;
using AssessmentTool.Services.DTO;
using ModelLayer;

namespace AssessmentTool.ServiceBridge
{
    public class ReportServiceBridge
    {
        public static ReportServiceClient getProxy()
        {
            var proxy = new ReportServiceClient();
            proxy.Endpoint.Address = DynamicEndpointHelper.ResolveEndpointUrl("ReportService");
            return proxy;
        }

        public static void getPdfProfilo(EventHandler<createPDFRadarCompletedEventArgs> downloadPdf, byte[] images, ReportRadarInfoDTO info)
        {
            var proxy = getProxy();
            proxy.createPDFRadarCompleted += new EventHandler<createPDFRadarCompletedEventArgs>(downloadPdf);

            proxy.createPDFRadarAsync(images, info);
        }
        public static void getPdfCompetenze(EventHandler<createPDFCompetenzeCompletedEventArgs> downloadPdf,Utente utente)
        {
            var proxy = getProxy();
            proxy.createPDFCompetenzeCompleted += new EventHandler<createPDFCompetenzeCompletedEventArgs>(downloadPdf);
            proxy.createPDFCompetenzeAsync(utente);
        }
    }
}
